<?php

namespace App\Http\Controllers;


use Illuminate\Support\Facades\Auth;

class NotificationsController extends Controller
{

    public function index()
    {
        $user = Auth::user();

        $notifications = $user->notifications()->paginate(20);
        $notifications->markAsRead();
        return view('notifications.index',['notifications' => $notifications]);
    }
}
